/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * tk3D.java
 *
 * Created on 30/03/2010, 12:37:20
 */

package br.ufrn.dca.scontrol.view.componentes;

/**
 *
 * @author marco
 */
public class tk3D extends javax.swing.JPanel {

    Tanks3DCanvas Tanks3d = new Tanks3DCanvas();

    /** Creates new form tk3D */
    public tk3D() {
        initComponents();
        this.add(Tanks3d);
        Tanks3d.setSize(this.getPreferredSize());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentResized(java.awt.event.ComponentEvent evt) {
                formComponentResized(evt);
            }
        });
        addHierarchyBoundsListener(new java.awt.event.HierarchyBoundsListener() {
            public void ancestorMoved(java.awt.event.HierarchyEvent evt) {
            }
            public void ancestorResized(java.awt.event.HierarchyEvent evt) {
                formAncestorResized(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    private void formAncestorResized(java.awt.event.HierarchyEvent evt) {//GEN-FIRST:event_formAncestorResized
        Tanks3d.setSize(this.getSize());
        Tanks3d.setCanvasSize(this.getSize());
    }//GEN-LAST:event_formAncestorResized

    private void formComponentResized(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentResized
        Tanks3d.setSize(this.getSize());
        Tanks3d.setCanvasSize(this.getSize());
    }//GEN-LAST:event_formComponentResized

    public Tanks3DCanvas getTanks3d() {
        return Tanks3d;
    }

    public void setTanks3d(Tanks3DCanvas Tanks3d) {
        this.Tanks3d = Tanks3d;
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

}
